<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="../../style.css" type="text/css" media="screen">
<link rel="stylesheet" href="../../print.css" type="text/css" media="print">
<meta content="TweenNano,com.greensock.TweenNano,duration,target,useFrames,vars,complete,delayedCall,from,kill,killTweensOf,renderTime,to" name="keywords">
<title>com.greensock.TweenNano</title>
</head>
<body>
<script type="text/javascript" language="javascript" src="../../asdoc.js"></script><script type="text/javascript" language="javascript" src="../../cookies.js"></script><script type="text/javascript" language="javascript">
<!--
				asdocTitle = 'TweenNano - API Documentation';
				var baseRef = '../../';
				window.onload = configPage;
			--></script>
<table style="display:none" id="titleTable" cellspacing="0" cellpadding="0" class="titleTable">
<tr>
<td align="left" class="titleTableTitle">API Documentation</td><td align="right" class="titleTableTopNav"><a onclick="loadClassListFrame('../../all-classes.html')" href="../../package-summary.html">All&nbsp;Packages</a>&nbsp;|&nbsp;<a onclick="loadClassListFrame('../../all-classes.html')" href="../../class-summary.html">All&nbsp;Classes</a>&nbsp;|&nbsp;<a onclick="loadClassListFrame('../../index-list.html')" href="../../all-index-A.html">Index</a>&nbsp;|&nbsp;<a href="../../index.html?com/greensock/TweenNano.html&amp;com/greensock/class-list.html" id="framesLink1">Frames</a><a onclick="parent.location=document.location" href="" style="display:none" id="noFramesLink1">No&nbsp;Frames</a></td><td rowspan="3" align="right" class="titleTableLogo"><img alt="Adobe Logo" title="Adobe Logo" class="logoImage" src="../../images/logo.jpg"></td>
</tr>
<tr class="titleTableRow2">
<td align="left" id="subTitle" class="titleTableSubTitle">Class&nbsp;TweenNano</td><td align="right" id="subNav" class="titleTableSubNav"><a href="#propertySummary">Properties</a>&nbsp;| <a href="#methodSummary">Methods</a></td>
</tr>
<tr class="titleTableRow3">
<td colspan="2">&nbsp;</td>
</tr>
</table>
<script type="text/javascript" language="javascript">
<!--
if (!isEclipse() || window.name != ECLIPSE_FRAME_NAME) {titleBar_setSubTitle("Class TweenNano"); titleBar_setSubNav(false,true,false,false,false,false,true,false,false,false,false,false,false,false);}
--></script>
<div class="MainContent">
<table cellspacing="0" cellpadding="0" class="classHeaderTable">
<tr>
<td class="classHeaderTableLabel">Package</td><td><a onclick="javascript:loadClassListFrame('class-list.html')" href="package-detail.html">com.greensock</a></td>
</tr>
<tr>
<td class="classHeaderTableLabel">Class</td><td class="classSignature">public class TweenNano</td>
</tr>
</table>
<p></p>
  TweenNano is a super-lightweight (1.6k in AS3 and 2k in AS2) version of <a href="http://www.TweenLite.com">TweenLite</a> 
  and is only recommended for situations where you absolutely cannot afford the extra 3.1k (4.7k total) that the normal 
  TweenLite engine would cost and your project doesn't require any plugins. Normally, it is much better to use 
  TweenLite because of the additional flexibility it provides via plugins and its compatibility with TimelineLite and TimelineMax. 
  TweenNano can do everything TweenLite can do with the following exceptions:
  <ul>
   <li><b> No Plugins </b>- One of the great things about TweenLite is that you can activate
    plugins in order to add features (like autoAlpha, tint, blurFilter, etc.). TweenNano, however, 
    doesn't work with plugins. </li>
     
   <li><b> Incompatible with TimelineLite and TimelineMax </b>- Complex sequencing and management of groups of 
    tweens can be much easier with TimelineLite and TimelineMax, but TweenNano instances cannot be inserted into
    TimelineLite or TimelineMax instances.</li>
     
   <li><b> Slight speed decrease </b>- Under very heavy loads, TweenNano won't perform quite as well as TweenLite, but
    it is extremely unlikely that you'd notice unless you're tweening thousands of objects simultaneously.</li>
     
   <li><b> Fewer overwrite modes </b>- You can either overwrite all or none of the existing tweens of the same 
    object (overwrite:true or overwrite:false) in TweenNano. TweenLite, however, can use OverwriteManager to expand 
    its capabilities and use modes like AUTO, CONCURRENT, PREEXISTING, and ALL_ONSTART
    (see <a href="http://www.greensock.com/overwritemanager/">http://www.greensock.com/overwritemanager/</a>
    for details).</li>
 
   <li><b>Compared to TweenLite, TweenNano is missing the following methods/properties:</b>
    <ul>
     <li>pause()</li>
     <li>play()</li>
     <li>resume()</li>
     <li>restart()</li>
     <li>reverse()</li>
     <li>invalidate()</li>
     <li>onStart</li>
     <li>onInit</li>
     <li>defaultEase</li>
     <li>easeParams</li>
     <li>currentTime</li>
     <li>startTime</li>
     <li>totalTime</li>
     <li>paused</li>
     <li>reversed</li>
     <li>totalDuration</li>
    </ul>
   </li>
  </ul>
 
 <hr/> 
 <b>SPECIAL PROPERTIES:</b>
 <br /><br />
 
 Any of the following special properties can optionally be passed in through the vars object (the third parameter):
 
 <ul>
  <li><b> delay : Number</b>   Amount of delay in seconds (or frames for frames-based tweens) before the tween should begin.</li>
  
  <li><b> useFrames : Boolean</b>  If useFrames is set to true, the tweens's timing mode will be based on frames. 
           Otherwise, it will be based on seconds/time.</li>
  
  <li><b> ease : Function</b>   Use any standard easing equation to control the rate of change. For example, 
           <code>Elastic.easeOut</code>. The Default is Regular.easeOut.</li>
  
  <li><b> onUpdate : Function</b>  A function that should be called every time the tween's time/position is updated 
           (on every frame while the timeline is active)</li>
  
  <li><b> onUpdateParams : Array</b> An Array of parameters to pass the onUpdate function</li>
  
  <li><b> onComplete : Function</b> A function that should be called when the tween has finished </li>
  
  <li><b> onCompleteParams : Array</b> An Array of parameters to pass the onComplete function.</li>
  
  <li><b> immediateRender : Boolean</b> Normally when you create a from() tween, it renders the starting state immediately even
             if you define a delay which in typical "animate in" scenarios is very desirable, but
             if you prefer to override this behavior and have the from() tween render only after any 
             delay has elapsed, set <code>immediateRender</code> to false. </li>
  
  <li><b> overwrite : Boolean</b>  Controls how other tweens of the same object are handled when this tween is created. Here are the options:
           <ul>
             <li><b> false (NONE):</b> No tweens are overwritten. This is the fastest mode, but you need to be careful not 
              to create any tweens with overlapping properties of the same object that run at the same time, 
              otherwise they'll conflict with each other. <br /><code>
                  TweenNano.to(mc, 1, {x:100, y:200});<br />
               TweenNano.to(mc, 1, {x:300, delay:2, overwrite:false}); //does NOT overwrite the previous tween.</code></li>
            
           <li><b> true (ALL_IMMEDIATE):</b> This is the default mode in TweenNano. All tweens of the same target
              are completely overwritten immediately when the tween is created, regardless of whether or 
              not any of the properties overlap. <br /><code>
                  TweenNano.to(mc, 1, {x:100, y:200});<br />
               TweenNano.to(mc, 1, {x:300, delay:2, overwrite:true}); //immediately overwrites the previous tween</code></li>
           </ul></li>
  </ul>
 
 <b>EXAMPLES:</b> <br /><br />
 
  Tween the the MovieClip "mc" to an alpha value of 0.5 (50% transparent) and an x-coordinate of 120 
  over the course of 1.5 seconds like so:<br /><br />
  
 <code>
   import com.greensock.TweenNano;<br /><br />
   TweenNano.to(mc, 1.5, {alpha:0.5, x:120});
  </code><br /><br />
  
  To tween the "mc" MovieClip's alpha property to 0.5, its x property to 120 using the <code>Back.easeOut</code> easing 
  function, delay starting the whole tween by 2 seconds, and then call a function named "onFinishTween" when it 
  has completed (it will have a duration of 5 seconds) and pass a few parameters to that function (a value of 
  5 and a reference to the mc), you'd do so like:<br /><br />
   
  <code>
   import com.greensock.TweenNano;<br />
   import com.greensock.easing.Back;<br /><br />
 
   TweenNano.to(mc, 5, {alpha:0.5, x:120, ease:Back.easeOut, delay:2, onComplete:onFinishTween, onCompleteParams:[5, mc]});<br />
   function onFinishTween(param1:Number, param2:MovieClip):void {<br />
    trace("The tween has finished! param1 = " + param1 + ", and param2 = " + param2);<br />
   }
  </code><br /><br />
  
  If you have a MovieClip on the stage that is already in it's end position and you just want to animate it into 
  place over 5 seconds (drop it into place by changing its y property to 100 pixels higher on the screen and 
  dropping it from there), you could:<br /><br />
  
  <code>
   import com.greensock.TweenNano;<br />
   import com.greensock.easing.Elastic;<br /><br />
 
   TweenNano.from(mc, 5, {y:"-100", ease:Elastic.easeOut});  
  </code><br /><br />
 
 <b>NOTES:</b><br /><br />
 <ul>
  <li> The base TweenNano class adds about 1.6k to your Flash file.</li>
    
  <li> Passing values as Strings will make the tween relative to the current value. For example, if you do
    <code>TweenNano.to(mc, 2, {x:"-20"});</code> it'll move the mc.x to the left 20 pixels which is the same as doing
    <code>TweenNano.to(mc, 2, {x:mc.x - 20});</code> You could also cast it like: <code>TweenNano.to(mc, 2, {x:String(myVariable)});</code></li>
  
  <li> Kill all tweens for a particular object anytime with the <code>TweenNano.killTweensOf(mc); </code></li>
    
  <li> You can kill all delayedCalls to a particular function using <code>TweenNano.killTweensOf(myFunction);</code>
    This can be helpful if you want to preempt a call.</li>
 
  <li> If some of your tweens don't appear to be working, read about the <code>overwrite</code> special property
   above - it is most likely an overwriting issue that could be solved by adding <code>overwrite:false</code> to your vars object.</li>
    
  <li> Use the <code>TweenNano.from()</code> method to animate things into place. For example, if you have things set up on 
    the stage in the spot where they should end up, and you just want to animate them into place, you can 
    pass in the beginning x and/or y and/or alpha (or whatever properties you want).</li>
    
  <li> If you find this class useful, please consider joining Club GreenSock which not only helps to sustain
    ongoing development, but also gets you bonus plugins, classes and other benefits that are ONLY available 
    to members. Learn more at <a href="http://www.greensock.com/club/">http://www.greensock.com/club/</a></li>
 </ul>
 
 <b>Copyright 2011, GreenSock. All rights reserved.</b> This work is subject to the terms in <a href="http://www.greensock.com/terms_of_use.html">http://www.greensock.com/terms_of_use.html</a> or for corporate Club GreenSock members, the software agreement that was issued with the corporate membership.
 
 <p></p>
<br>
<hr>
</div>
<a name="propertySummary"></a>
<div class="summarySection">
<div class="summaryTableTitle">Public Properties</div>
<table id="summaryTableProperty" class="summaryTable " cellpadding="3" cellspacing="0">
<tr>
<th>&nbsp;</th><th colspan="2">Property</th><th class="summaryTableOwnerCol">Defined&nbsp;by</th>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#duration">duration</a> : Number<div class="summaryTableDescription"> Duration of the tween in seconds (or in frames if "useFrames" is true).</div>
</td><td class="summaryTableOwnerCol">TweenNano</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#target">target</a> : Object<div class="summaryTableDescription"> Target object whose properties this tween affects.</div>
</td><td class="summaryTableOwnerCol">TweenNano</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#useFrames">useFrames</a> : Boolean<div class="summaryTableDescription"> Indicates that frames should be used instead of seconds for timing purposes.</div>
</td><td class="summaryTableOwnerCol">TweenNano</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#vars">vars</a> : Object<div class="summaryTableDescription"> Stores variables (things like "alpha", "y" or whatever we're tweening, as well as special properties like "onComplete").</div>
</td><td class="summaryTableOwnerCol">TweenNano</td>
</tr>
</table>
</div>
<a name="methodSummary"></a>
<div class="summarySection">
<div class="summaryTableTitle">Public Methods</div>
<table id="summaryTableMethod" class="summaryTable " cellpadding="3" cellspacing="0">
<tr>
<th>&nbsp;</th><th colspan="2">Method</th><th class="summaryTableOwnerCol">Defined&nbsp;by</th>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#TweenNano()">TweenNano</a>(target:Object, duration:Number, vars:Object)</div>
<div class="summaryTableDescription">
   Constructor
    
   </div>
</td><td class="summaryTableOwnerCol">TweenNano</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#complete()">complete</a>(skipRender:Boolean = false):void</div>
<div class="summaryTableDescription">
   Forces the tween to completion.</div>
</td><td class="summaryTableOwnerCol">TweenNano</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#delayedCall()">delayedCall</a>(delay:Number, onComplete:Function, onCompleteParams:Array = null, useFrames:Boolean = false):<a href="../greensock/TweenNano.html">TweenNano</a>
</div>
<div class="summaryTableDescription">[static]
   Provides a simple way to call a function after a set amount of time (or frames).</div>
</td><td class="summaryTableOwnerCol">TweenNano</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#from()">from</a>(target:Object, duration:Number, vars:Object):<a href="../greensock/TweenNano.html">TweenNano</a>
</div>
<div class="summaryTableDescription">[static]
   Static method for creating a TweenNano instance that tweens in the opposite direction
   compared to a TweenNano.to() tween.</div>
</td><td class="summaryTableOwnerCol">TweenNano</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#kill()">kill</a>():void</div>
<div class="summaryTableDescription"> Kills the tween, stopping it immediately.</div>
</td><td class="summaryTableOwnerCol">TweenNano</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#killTweensOf()">killTweensOf</a>(target:Object, complete:Boolean = false):void</div>
<div class="summaryTableDescription">[static]
   Kills all the tweens of a particular object, optionally forcing them to completion too.</div>
</td><td class="summaryTableOwnerCol">TweenNano</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#renderTime()">renderTime</a>(time:Number):void</div>
<div class="summaryTableDescription">
   Renders the tween at a particular time (or frame number for frames-based tweens)
   WITHOUT changing its startTime, meaning if the tween is in progress when you call
   renderTime(), it will not adjust the tween's timing to continue from the new time.</div>
</td><td class="summaryTableOwnerCol">TweenNano</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#to()">to</a>(target:Object, duration:Number, vars:Object):<a href="../greensock/TweenNano.html">TweenNano</a>
</div>
<div class="summaryTableDescription">[static]
   Static method for creating a TweenNano instance which can be more intuitive for some developers 
   and shields them from potential garbage collection issues that could arise when assigning a
   tween instance to a variable that persists.</div>
</td><td class="summaryTableOwnerCol">TweenNano</td>
</tr>
</table>
</div>
<script type="text/javascript" language="javascript">
<!--
showHideInherited();
--></script>
<div class="MainContent">
<a name="propertyDetail"></a>
<div class="detailSectionHeader">Property detail</div>
<a name="duration"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">duration</td><td class="detailHeaderType">property</td>
</tr>
</table>
<div class="detailBody">
<code>public var duration:Number</code><p> Duration of the tween in seconds (or in frames if "useFrames" is true). </p></div>
<a name="target"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">target</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public var target:Object</code><p> Target object whose properties this tween affects. This can be ANY object, not just a DisplayObject. </p></div>
<a name="useFrames"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">useFrames</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public var useFrames:Boolean</code><p> Indicates that frames should be used instead of seconds for timing purposes. So if useFrames is true and the tween's duration is 10, it would mean that the tween should take 10 frames to complete, not 10 seconds. </p></div>
<a name="vars"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">vars</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public var vars:Object</code><p> Stores variables (things like "alpha", "y" or whatever we're tweening, as well as special properties like "onComplete"). </p></div>
<a name="constructorDetail"></a>
<div class="detailSectionHeader">Constructor detail</div>
<a name="TweenNano()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">TweenNano</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">constructor</td>
</tr>
</table>
<div class="detailBody">
<code>public function TweenNano(target:Object, duration:Number, vars:Object)</code><p>
   Constructor
    
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">target</span>:Object</code> &mdash; Target object whose properties this tween affects. This can be ANY object, not just a DisplayObject. 
   </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">duration</span>:Number</code> &mdash; Duration in seconds (or in frames if "useFrames" is true)
   </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">vars</span>:Object</code> &mdash; An object containing the end values of the properties you're tweening, like {x:100, y:50}. It can also contain special properties like "onComplete", "ease", "delay", etc.
   </td>
</tr>
</table>
</div>
<a name="methodDetail"></a>
<div class="detailSectionHeader">Method detail</div>
<a name="complete()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">complete</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td>
</tr>
</table>
<div class="detailBody">
<code>public function complete(skipRender:Boolean = false):void</code><p>
   Forces the tween to completion.
   
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">skipRender</span>:Boolean</code> (default = <code>false</code>)<code></code> &mdash; To skip rendering the final state of the tween, set skipRender to true. 
   </td>
</tr>
</table>
</div>
<a name="delayedCall()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">delayedCall</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public static function delayedCall(delay:Number, onComplete:Function, onCompleteParams:Array = null, useFrames:Boolean = false):<a href="../greensock/TweenNano.html">TweenNano</a></code><p>
   Provides a simple way to call a function after a set amount of time (or frames). You can
   optionally pass any number of parameters to the function too. For example:<br /><br /><code>
   
   TweenNano.delayedCall(1, myFunction, ["param1", 2]); <br />
   function myFunction(param1:String, param2:Number):void { <br />
       trace("called myFunction and passed params: " + param1 + ", " + param2); <br />
   } </code>
   
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">delay</span>:Number</code> &mdash; Delay in seconds (or frames if "useFrames" is true) before the function should be called
   </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">onComplete</span>:Function</code> &mdash; Function to call
   </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">onCompleteParams</span>:Array</code> (default = <code>null</code>)<code></code> &mdash; An Array of parameters to pass the function.
   </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">useFrames</span>:Boolean</code> (default = <code>false</code>)<code></code> &mdash; If the delay should be measured in frames instead of seconds, set useFrames to true (default is false)
   </td>
</tr>
</table>
<p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code><a href="../greensock/TweenNano.html">TweenNano</a></code> &mdash; 
                        TweenNano instance
   
                        
                     </td>
</tr>
</table>
</div>
<a name="from()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">from</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public static function from(target:Object, duration:Number, vars:Object):<a href="../greensock/TweenNano.html">TweenNano</a></code><p>
   Static method for creating a TweenNano instance that tweens in the opposite direction
   compared to a TweenNano.to() tween. In other words, you define the START values in the 
   vars object instead of the end values, and the tween will use the current values as 
   the end values. This can be very useful for animating things into place on the stage
   because you can build them in their end positions and do some simple TweenNano.from()
   calls to animate them into place. <b>NOTE:</b> By default, <code>immediateRender</code>
   is <code>true</code> in from() tweens, meaning that they immediately render their starting state 
   regardless of any delay that is specified. You can override this behavior by passing 
   <code>immediateRender:false</code> in the <code>vars</code> object so that it will wait to 
   render until the tween actually begins. To illustrate the default behavior, the following code 
   will immediately set the <code>alpha</code> of <code>mc</code> to 0 and then wait 2 seconds 
   before tweening the <code>alpha</code> back to 1 over the course of 1.5 seconds:<br /><br /><code>
   
   TweenNano.from(mc, 1.5, {alpha:0, delay:2});</code>
   
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">target</span>:Object</code> &mdash; Target object whose properties this tween affects. This can be ANY object, not just a DisplayObject. 
   </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">duration</span>:Number</code> &mdash; Duration in seconds (or frames if "useFrames" is true)
   </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">vars</span>:Object</code> &mdash; An object containing the start values of the properties you're tweening like {x:100, y:50}. It can also contain special properties like "onComplete", "ease", "delay", etc.
   </td>
</tr>
</table>
<p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code><a href="../greensock/TweenNano.html">TweenNano</a></code> &mdash; 
                        TweenNano instance
   
                        
                     </td>
</tr>
</table>
</div>
<a name="kill()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">kill</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function kill():void</code><p> Kills the tween, stopping it immediately. </p></div>
<a name="killTweensOf()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">killTweensOf</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public static function killTweensOf(target:Object, complete:Boolean = false):void</code><p>
   Kills all the tweens of a particular object, optionally forcing them to completion too.
   
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">target</span>:Object</code> &mdash; Object whose tweens should be immediately killed
   </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">complete</span>:Boolean</code> (default = <code>false</code>)<code></code> &mdash; Indicates whether or not the tweens should be forced to completion before being killed.
   </td>
</tr>
</table>
</div>
<a name="renderTime()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">renderTime</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function renderTime(time:Number):void</code><p>
   Renders the tween at a particular time (or frame number for frames-based tweens)
   WITHOUT changing its startTime, meaning if the tween is in progress when you call
   renderTime(), it will not adjust the tween's timing to continue from the new time. 
   The time is based simply on the overall duration. For example, if a tween's duration
   is 3, renderTime(1.5) would render it at the halfway finished point.
   
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">time</span>:Number</code> &mdash; time (or frame number for frames-based tweens) to render.
   </td>
</tr>
</table>
</div>
<a name="to()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">to</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public static function to(target:Object, duration:Number, vars:Object):<a href="../greensock/TweenNano.html">TweenNano</a></code><p>
   Static method for creating a TweenNano instance which can be more intuitive for some developers 
   and shields them from potential garbage collection issues that could arise when assigning a
   tween instance to a variable that persists. The following lines of code all produce exactly 
   the same result: <br /><br /><code>
   
   var myTween:TweenNano = new TweenNano(mc, 1, {x:100}); <br />
   TweenNano.to(mc, 1, {x:100}); <br />
   var myTween:TweenNano = TweenNano.to(mc, 1, {x:100});</code>
   
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">target</span>:Object</code> &mdash; Target object whose properties this tween affects. This can be ANY object, not just a DisplayObject. 
   </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">duration</span>:Number</code> &mdash; Duration in seconds (or frames if "useFrames" is true)
   </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">vars</span>:Object</code> &mdash; An object containing the end values of the properties you're tweening, like {x:100, y:50}. It can also contain special properties like "onComplete", "ease", "delay", etc.
   </td>
</tr>
</table>
<p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code><a href="../greensock/TweenNano.html">TweenNano</a></code> &mdash; 
                        TweenNano instance
   
                        
                     </td>
</tr>
</table>
</div>
<br>
<br>
<hr>
<br>
<p></p>
<center class="copyright"> 
</center>
</div>
</body>
</html>
<!-- -->
